Array = Yacon.apply(Array,{
	
	
	max:function()
	{
	   	var i, maxval = this[0];
	   	for (i = 1; i < this.length; i++)
	   	{
	   		if (maxval < this[i])
	   			maxval = this[i];
	   	}
	   return maxval;
	},
	
	min:function()
	{
	   	var i, minval = this[0];
	   	for (i = 1; i < this.length; i++)
	   	{
	   		if (minval > this[i])
	   			minval = this[i];
	   	}
	   return minval;
	},
	
	replace:function (array)
	{
	    this.clear();
	    for(var i in array)
    	{
	    	this[i] = array[i];
    	} 
	    return this;
	   
	},

	add:function (obj)
	{	    
	    this[this.length] = obj;
	    return this;
	 },
	
	get:function (index)
	 {
	     if ((index < this.length) && (index >= 0))
	 	 {
	         return this[index];
	     }
	     return null;
	 },
	
	 indexOf:function (obj)
	 {
	     for (var i = 0; i < this.length; i++)
	 	 {
	         if (this[i] == obj)
	 		 {
	             return i;
	         }
	     }
	     return -1;
	 },
	
	 isExit:function (obj)
	 {
	     for (var i = 0; i < this.length; i++)
	 	 {
	         if (this[i] == obj)
	 		 {
	             return true;
	         }
	     }
	     return false;
	 },
	
	 remove:function (obj)
	 {
		
		 if (Yacon.isNumber(obj))
    	 {
    		 if (obj < 0 ||obj >= this.length)
    			 return this;
    	 }
		 
		 var tempList = new Array();
	     for (var i = 0, ti = 0; i < this.length; i++)
	 	 {
	    	 if (Yacon.isNumber(obj))
	    	 {
	    		 if (i != obj)
		 		 {
		             tempList[ti] = this[i];
		             ti++;
		         }else
		         {
		        	delete this[i];
		         }
	    	 }else
	    	 {
		    	 if (this[i] != obj)
		 		 {
		             tempList[ti] = this[i];
		             ti++;
		         }else
		         {
		        	 delete this[i];
		         }
	    	 }
	     }
	     this.replace(tempList);
	     return  this;
	 },

	size:function ()
	{
	    return this.length;
	},

	clear:function ()
	{
	    for (var i= this.length-1;i>-1;i--)
		{
	        this[i] = null;
			delete this[i];
	    }
	    this.length = 0;
	}

});
	





